package MultiplePrimeryKey;

import java.util.Date;

public class CommFlowId implements java.io.Serializable {


	private static final long serialVersionUID = -9165355513569311734L;
	private Long channelId;
	private Date occurTime;

	public CommFlowId() {
	}

	public CommFlowId(Long channelId, Date occurTime) {
		this.channelId = channelId;
		this.occurTime = occurTime;
	}

	public Long getChannelId() {
		return this.channelId;
	}

	public void setChannelId(Long channelId) {
		this.channelId = channelId;
	}

	public Date getOccurTime() {
		return this.occurTime;
	}

	public void setOccurTime(Date occurTime) {
		this.occurTime = occurTime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CommFlowId))
			return false;
		CommFlowId castOther = (CommFlowId) other;

		return ((this.getChannelId() == castOther.getChannelId()) || (this
				.getChannelId() != null && castOther.getChannelId() != null && this
				.getChannelId().equals(castOther.getChannelId())))
				&& ((this.getOccurTime() == castOther.getOccurTime()) || (this
						.getOccurTime() != null
						&& castOther.getOccurTime() != null && this
						.getOccurTime().equals(castOther.getOccurTime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getChannelId() == null ? 0 : this.getChannelId().hashCode());
		result = 37 * result
				+ (getOccurTime() == null ? 0 : this.getOccurTime().hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "CommFlowId{" +
				"channelId=" + channelId +
				", occurTime=" + occurTime +
				'}';
	}
}